﻿<Window x:Class="LogoScriptIDE.CanvasWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:i="clr-namespace:System.Windows.Interop;assembly=PresentationCore"
        Title="Canvas" SizeToContent="Manual" Closing="Window_Closing" ShowInTaskbar="False" WindowStyle="ToolWindow"
        Background="LightGray">
    <DockPanel>
        <StatusBar BorderBrush="Gray" BorderThickness="2" DockPanel.Dock="Bottom">
            <TextBlock Name="tb" Foreground="Black">
                MousePosition | 
            </TextBlock>
            <TextBlock Name="ui_MousePosition"/>
        </StatusBar>
    
    <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" MouseMove="ui_layout_MouseMove" ContextMenuOpening="ScrollViewer_ContextMenuOpening">
        <ScrollViewer.ContextMenu>
            <ContextMenu>
                <MenuItem Name="ui_mnuSetxy" Header="" Click="ui_mnuSetxy_Click"/>
                <MenuItem Name="ui_mnuSetxyPU" Header="" Click="ui_mnuSetxyPU_Click"/>
                <Separator/>
                <MenuItem Name="ui_mnuSave" Header="Save to file" Click="ui_mnuSave_Click"/>
            </ContextMenu>
        </ScrollViewer.ContextMenu>
        <Canvas Name="ui_layout" Width="640" Height="480" MouseLeftButtonUp="ui_layout_MouseLeftButtonUp" >
            <Image x:Name="imgelt" Width="640" Height="480">
                <Image.Source>
                    <i:D3DImage x:Name="d3dimg" />
                </Image.Source>
            </Image>
        </Canvas>
    </ScrollViewer>
        
    </DockPanel>
</Window>
